package TCPDemo;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;

public class SendDemo {

	public static void main(String[] args) throws UnknownHostException, IOException {
		Socket sk = new Socket("192.168.0.112", 10000);

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String read;
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(sk.getOutputStream()));
		while ((read = br.readLine())!=null) {
			
			if ("886".equals(read)) {
				break;
			}
			bw.write(read);
			
			bw.flush();

			
		}

		br.close();
		sk.close();
	}
}
